Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Cleanup classmap and include it properly for stubs generation #17667

Merged
merged 5 commits into from
Aug 22, 2017

Conversation

laoneo
Copy link
Member

@laoneo laoneo commented Aug 22, 2017

Cleanup classmap and include it properly for stubs generation.


JLoader::registerAlias('JAccess', '\\Joomla\\CMS\\Access\\Access', '5.0');
JLoader::registerAlias('JAccessRule', '\\Joomla\\CMS\\Access\\Rule', '5.0');
JLoader::registerAlias('JAccessRules', '\\Joomla\\CMS\\Access\\Rules', '5.0');
JLoader::registerAlias('JAccessWrapperAccess', '\\Joomla\\CMS\\Access\\Wrapper\\Access', '4.0');
JLoader::registerAlias('JAccessExceptionNotallowed', '\\Joomla\\CMS\\Access\\Exception\\NotAllowed', '5.0');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this one should exist :/ Have I accidently removed it in a conflict somewhere

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find in core a class with the name NotAllowed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d5f9f72 I've added it back. Somehow the class got deleted but was being used in like 20 different places in the code :/

@@ -25,6 +25,9 @@
}

// Get the Platform with legacy libraries.
require_once JPATH_LIBRARIES . '/bootstrap.php';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need bootstrap.php and import.legacy.php I don't think. Bootstrap was a replacement and we just left the others for b/c in cli scripts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem is that then the following code is not loaded which initialises the extensions
https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/bootstrap.php#L43-L45. I can add that to the stubs generator manually, otherwise the https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/extensions.classmap.php fails, because of class not found.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if we remove import.legacy.php and replace it with bootstrap?

@laoneo
Copy link
Member Author

laoneo commented Aug 22, 2017

I could also remove cms.php. Should be ok now, stubsgenerator works now on 4 as well.

@wilsonge wilsonge merged commit e25f92d into joomla:4.0-dev Aug 22, 2017
@wilsonge wilsonge deleted the j4/fix-stubs-generator branch August 22, 2017 14:03
@wilsonge wilsonge added this to the Joomla 4.0 milestone Aug 22, 2017
roland-d added a commit to roland-d/joomla-cms that referenced this pull request Aug 31, 2017
…olandd-4.0-dev

* '4.0-dev' of https://github.com/joomla/joomla-cms: (35 commits)
  Delete redis handler in favor of fw handler (joomla#17798)
  Remove deprecated JArrayHelper (joomla#17795)
  [4.0] codestyle (joomla#17779)
  Update error renderers for PHP 7 code structure, update Exception/Throwable references to only reference Throwable (joomla#17750)
  Improve article association links
  Fix parsing routes with language filter enabled
  Fix JString use
  [4.0] Fix content margin if no "top" modules are assigned (joomla#17699)
  Removed required state for Secret Key field (joomla#17713)
  [4.0] [installation]  set proper default for lastResetTime (joomla#16847)
  [4.0] Remove FOF From Joomla Core (joomla#17687)
  [4.0] Add Controller suffix to extension controllers (joomla#17624)
  Fix menu association form field not loading
  remove html imports (joomla#17691)
  [4.0] Update Bootstrap to beta-1 (joomla#17496)
  Move files
  [4.0] Cleanup classmap and include it properly for stubs generation (joomla#17667)
  Add back class that got deleted somewhere
  Fix Sql field class name (joomla#17666)
  [4.0] Fix namespaced form fields Part 2 (joomla#17664)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants